<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

<ui:composition template="/templates/modeloGeral.xhtml">
	<ui:define name="conteudo">
		<h:form>
		<p:toolbar>
				<f:facet name="left">
					<h:outputText value="Login" />
				</f:facet>
			</p:toolbar>
			
			<h:panelGrid columns="2">
			<p:outputLabel value="Email::" />
				<p:inputText maxlength="70" size="70" value="#{autenticacaoBean.clienteLogado.email}">
					<f:validateBean />
					</p:inputText>
				
				<p:outputLabel value="Senha::" />
				<p:password maxlength="6" size="15" value="#{autenticacaoBean.clienteLogado.senha}">
					<f:validateBean />
					</p:password>
			</h:panelGrid>
			
			<h:panelGrid columns="1">
			<p:commandButton value= "Entrar" action="#{autenticacaoBean.entrarCliente}" update=":msgGlobal :frmMnPrincipal:pnlMnPrincipal" 
			actionListener="#{autenticacaoBean.autenticarCliente}" />
			</h:panelGrid>
			
		</h:form>
		<h:form>
		<p:toolbar>
				<f:facet name="left">
					<h:outputText value="Autenticação" />
				</f:facet>
			</p:toolbar>
			
			<h:panelGrid columns="2">
			<p:outputLabel value="CPF:" />
				<p:inputMask mask="999.999.999-99" size="15"
				value="#{autenticacaoBean.funcionarioLogado.cpf}">
				<f:validateBean />
				</p:inputMask>
				
				<p:outputLabel value="Senha::" />
				<p:password maxlength="6" size="15" value="#{autenticacaoBean.funcionarioLogado.senha}">
					<f:validateBean />
					</p:password>
					
			</h:panelGrid>
			
			<h:panelGrid columns="1">
			<p:commandButton value= "Entrar"  action="#{autenticacaoBean.entrar}" update=":msgGlobal :frmMnPrincipal:pnlMnPrincipal" 
			actionListener="#{autenticacaoBean.autenticar}" />
			</h:panelGrid>
			
		</h:form>
	</ui:define>

</ui:composition>

</html>